#f19052428肖汶浩
import cv2
import matplotlib.pyplot as plt
from showing import my_img_show

img = cv2.imread("222.jpg")
img_rbg = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
my_img_show(img)
border_params = (50, 50, 50, 50)

img_replicate = cv2.copyMakeBorder(img_rbg, *border_params, borderType=cv2.BORDER_REPLICATE)
img_reflect = cv2.copyMakeBorder(img_rbg, *border_params, borderType=cv2.BORDER_REFLECT)
img_reflect_101 = cv2.copyMakeBorder(img_rbg, *border_params, borderType=cv2.BORDER_REFLECT101)
img_wrap = cv2.copyMakeBorder(img_rbg, *border_params, borderType=cv2.BORDER_WRAP)
img_constant = cv2.copyMakeBorder(img_rbg, *border_params, borderType=cv2.BORDER_CONSTANT)

plt.subplot(231), plt.imshow(img_replicate)
plt.subplot(232), plt.imshow(img_reflect)
plt.subplot(233), plt.imshow(img_reflect_101)
plt.subplot(234), plt.imshow(img_wrap)
plt.subplot(235), plt.imshow(img_constant)

plt.show()
